home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Memphis Amiga Group / MAG DOS 2.0 Utilities Disk 01 (1991-09)(Memphis Amiga Group).zip / MAG DOS 2.0 Utilities Disk 01 (1991-09)(Memphis Amiga Group).adf / Back&Front / toBack&Front.doc < prev    next >
Text File  |  1991-08-17  |  12KB  |  269 lines

  1.  
  2.                              toBack&Front
  3.  
  4.                              (Commodity)
  5.  
  6.                                   by
  7.  
  8.                             Stefan Sticht
  9.  
  10.          This program (binary), sourcecode, documentation is
  11.  
  12.                             PUBLIC DOMAIN.
  13.  
  14.                      You may do anything with it!
  15.  
  16.  
  17. Purpose of this commodity:
  18. --------------------------
  19. toBack&Front  is  a  commodity,  with  which you can easily switch the
  20. window  under  the  mouse pointer in front of all others or behind all
  21. others.   If  the  mousepointer  is  over  an  backdrop  window or the
  22. titlebar  of a screen or no window, the screen is switched to front or
  23. to back.  For example you may install toBack&Front to bring any window
  24. to front if you double-click in it.  Or if you make three fast clicks,
  25. so  that this doesn't interfere with double-clicking an icon.  You may
  26. install  it  that double-clicking into a window while holding the left
  27. alt  key pressed switches the window to back.  Which action switches a
  28. window  or  screen  to  back or front is changeable.  Most inputevents
  29. (e.g.  keyboard or mouse events) can be such an action.
  30.  
  31. Requirements:
  32. -------------
  33. This  commodity  requires  at least Kickstart 37.* and Workbench 37.*.
  34. Please  check  this  out  using Version in the Shell or About from the
  35. Workbench's   Workbench   menu.    You   also   need   to   have   the
  36. commodities.library  in your libs:  directory.  Please check this out:
  37. type  "dir libs:" in the shell.  If you want to trap other inputevents
  38. than  rawkey events, e.g.  pressing of mouse buttons, you must have at
  39. least commodities.library 37.27!
  40.  
  41. How to start a commodity:
  42. -------------------------
  43. First  there  are  two  basically different ways to start a commodity:
  44. via Workbench or via Shell.
  45.  
  46.     Starting  it  via Workbench is extrem simple:  just doubleclick on
  47. its  icon  and  the  commodity gets started.  Perhaps you might change
  48. some  parameters of the commodity.  You do this with tool types.  Tool
  49. types can be changed by clicking at the commodities icon and selecting
  50. Information from the Workbench's Icon menu.  In the window which opens
  51. you  see a listview gadget in which all tool types are listed.  Please
  52. refer  to  your  Workbench  documentation  on  how to change this tool
  53. types.  Which parameters you can change for this specific commodity is
  54. described below.
  55.     Please  note  that  another  double  click on the commodity's icon
  56. forces  the  commodity  to quit, if it's already running.  Running two
  57. copies  of  toBack&Front  at  the same time isn't useful and therefore
  58. possible
  59.     To  start  a commodity via shell you type in its name.  If you get
  60. an  "Unknown  command  ???"  error  message,  you  have misspelled the
  61. commodity's  name  or the commodity isn't in your current directory or
  62. in the current search path.  The easiest way is to change your current
  63. directory  to the location of the commodity using the CD command.  You
  64. can  change  parameters  of  a commodity by command line options.  The
  65. available options are listed with ?  as the first parameter:
  66.  
  67.                             toBack&Front ?
  68.  
  69. gives you a list of the command line options.  The explanation of each
  70. option is below.  Starting the commodity once more while it is already
  71. running forces it to quit.
  72.  
  73.     If  you  want  the  commodity to be started at every boot-up, it's
  74. best to add this line to your User-Startup file:
  75.  
  76.                      <path>toBack&Front <options>
  77.  
  78. Don't  forget  to  replace  <path>  by  the  path to the commodities's
  79. location  and <options> by the options you want to change. For example
  80. add this line if your commodity is located in the Tools drawer of your
  81. boot disk:
  82.  
  83.                           Tools/toBack&Front
  84.  
  85.     Another way to start the commodity at every boot-up is to drag its
  86. icon  in  the  WBStartup drawer of your boot disk.  Then the commodity
  87. gets  started  as if you had double clicked on its icon.  But you have
  88. to  add the tool type DONOTWAIT to the icon.
  89.  
  90. Using Exchange:
  91. ---------------
  92. Exchange is the commodities controller program. With Exchange you can
  93. control all commodities: you can kill, disable, enable, show and hide
  94. commodities.
  95.     Start  the  Exchange  program,  which  usually is in the Utilities
  96. drawer  of your boot disk, by double clicking its icon.  Now you see a
  97. list  of  the available commodities.  Select the commodity you want to
  98. control.   The  commodities title, description and status is shown now
  99. below the listview gadget.
  100.     You  can  kill  the  commodity  using  the  Kill gadget...  If the
  101. commodity  has  a  window  to  open,  in which you usually change some
  102. parameters,  you  can  open  this window using Show.  Hide closes this
  103. window. toBack&Front has no window to open.
  104.  
  105.                         Changeable parameters:
  106.                         ----------------------
  107.  
  108. CX_Priority:
  109. ------------
  110. You  can  specify the priority of the Commodity within the commodities
  111. queue using the tool type or commandline option CX_PRIORITY=<n>, where
  112. <n> is the decimal value for the priority.  Default priority is 0.
  113.  
  114. Front_Action:
  115. -------------
  116. With  the  tool  type  or commandline option FRONT_ACTION=<action> you
  117. specify  which  action  switches the window under the mouse pointer or
  118. screen to front.  <action> is an input description string as described
  119. below.     Default   action   is   "FRONT_ACTION=rawmouse   leftbutton
  120. lbuttoncode" (left mousebutton).
  121.  
  122. Front_Clicks:
  123. -------------
  124. With  the tool type or commandline option FRONT_CLICKS=<n> you specify
  125. how  many  actions  have  to  occur to switch something to front.  Two
  126. actions  must  always  occur within the doubleclick-timeout, which you
  127. can  specify  in  the  Input  preferences.   For example if you want a
  128. window  to  be  switched to front when double-clicking in it, you must
  129. set  Front_Action to trap the left mousebutton and set Front_clicks=2.
  130. (This   example  is  the  default  for  front  action!)  If  you  want
  131. triple-clicking, set Front_clicks=3 etc.  Default is front_clicks=2.
  132.  
  133. Front_Remove:
  134. -------------
  135. With  the  tool  type  or  commandline  option FRONT_REMOVE=YES|NO you
  136. specify  wether  the  inputevent for the front action shall be removed
  137. and  therefore  not being sent further to other programs.  For example
  138. setting   front   action   to   trap   a   double  click  and  setting
  139. front_remove=yes  isn't useful, because any double-click will be eaten
  140. by  toBack&Front.   Then  you  can't  start  any  longer  a program by
  141. double-clicking on its icon.  On the other hand it might be usefull to
  142. remove  the  inputevent,  for  example  if  specify  the  action to be
  143. pressing  left alt and f once:  if you don't set front_remove=yes then
  144. pressing  left  alt  and  a  while  the mouse pointer is over an shell
  145. window  may write something in the window (depends on your keymap) and
  146. switches  it  to  front.   If you set front_remove=yes, only the front
  147. action  takes  place  without writing something in any window.  YES|NO
  148. stands  for  "you may use either YES or NO, nothing else".  Default is
  149. FRONT_REMOVE=NO.
  150.  
  151. Back_Action:
  152. ------------
  153. With  the  tool  type  or  commandline option BACK_ACTION=<action> you
  154. specify  which  action  switches the window under the mouse pointer or
  155. screen  to back.  <action> is an input description string as described
  156. below.   Default  action  is  "FRONT_ACTION=rawmouse  lalt  leftbutton
  157. lbuttoncode" (left mousebutton while pressing left alt key).
  158.  
  159. Back_Clicks:
  160. ------------
  161. With  the  tool type or commandline option BACK_CLICKS=<n> you specify
  162. how  many  actions  have  to  occur  to switch something to back.  See
  163. Front_Clicks for more information.  Default is back_clicks=2.
  164.  
  165. Back_Remove:
  166. ------------
  167. With  the  tool  type  or  commandline  option  BACK_REMOVE=YES|NO you
  168. specify wether the inputevent for the back action shall be removed and
  169. therefore  not being sent further to other programs.  See Front_remove
  170. for more information.  Default is BACK_REMOVE=YES.
  171.  
  172.  
  173.                       Input description strings
  174.                       -------------------------
  175.  
  176. With  input  description  strings  you  can  specify  almost any input
  177. action,  for  example  the action lshift f1, which means that pressing
  178. the  left  shift  and  the  f1  key  together  is the action.  In this
  179. commodity  you  can specify the action to open the commodity's window,
  180. as described above.
  181.  
  182. Input description strings have the following template:
  183.  
  184.       [class] (([-]qual)|syn)* [[-]upstroke] [highmap|ANSIcode]
  185.  
  186. (* means zero or more occurances of the of the expression in brackets)
  187.  
  188. class   is one of the following strings:
  189.         rawkey, rawmouse, event, pointerpos, timer, newprefs,
  190.         diskremoved, diskinserted.
  191.         If not specified, the class is taken to be "rawkey".
  192.  
  193. qual    is one of the strings:
  194.         lshift, rshift, capslock, control, lalt, ralt, lcommand,
  195.         rcommand, numericpad, repeat, midbutton, rbutton, leftbutton,
  196.         relativemouse
  197.         A preceding '-' means that the value of the corresponding
  198.         qualifier is to be considered irrelevant.
  199.  
  200. syn     (synonym) is one of the strings: shift, caps, alt
  201.         shift means "left or right shift"
  202.         caps means "shift or capslock"
  203.         alt means "either alt key"
  204.  
  205. upstroke (literally "upstroke")
  206.         if this token is absent, only downstrokes are considered
  207.         for rawmouse (mousebuttons) and rawkey events.  If it is
  208.         present alone, only upstrokes count.  If it preceded by
  209.         '-' it means that both up and down strokes are included.
  210.  
  211. highmap one of the strings:
  212.         comma, space, backspace, tab, enter, return, esc, del, up, down,
  213.         right, left, help, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10,
  214.         0, 1, 2, 3, 4, 5, 6, 7, 8, 9, (, ), /, *, -, +
  215.         lbuttoncode¹, mbuttoncode¹, rbuttoncode¹
  216.  
  217. ansicode a single character token is interpreted as a character code,
  218.         which is looked up in the system default keymap.
  219.  
  220. ¹ these keywords aren't builtin in commodities.library upto version 37.27;
  221.   they are parsed by toBack&Front and can only be used in toBack&Front
  222.  
  223. Some full examples:
  224. -------------------
  225.  
  226. Switch  window  to  front  when  pressing  left alt and f1, install no
  227. back_action:
  228. toback&Front "front_action=lalt f1" front_clicks=1 front_remove=yes
  229.              "back_action="
  230.  
  231. Switch  window  to front when clicking 3 times in the window with left
  232. mouse  button  (left mouse button is already default!), switch to back
  233. when  double-clicking  with middle mouse button (requires three button
  234. mouse!):
  235. toback&Front front_clicks=3 "back_action=rawmouse midbutton mbuttoncode"
  236.              back_clicks=2
  237.  
  238. Switch  window  to  front when double-clicking in the window with left
  239. mouse  button  (left  mouse button is already default!) while pressing
  240. left  alt  key,  switch  to  back when double-clicking with left mouse
  241. button while pressing left amiga key:
  242. toback&Front "front_action=rawmouse lalt leftbutton lbuttoncode"
  243.              "back_action=rawmouse lcommand leftbutton lbuttoncode"
  244.  
  245. A funny example:
  246. Switch  window  to  front  when  inserting a disk in any drive, Switch
  247. window to back when removing a disk from any drive:
  248. toback&Front front_action=diskinserted front_clicks=1 front_remove=no
  249.              back_action=diskremoved back_clicks=1 back_remove=no
  250.  
  251.  
  252. Send bug-reports, enhancement-requests, questions, gifts(!) to:
  253. ---------------------------------------------------------------
  254. Stefan Sticht
  255. Bibereckerweg 40a
  256. D-8390 Passau 18
  257. FRG
  258.  
  259. or (better) EMail to:
  260. Internet: cbmvax.commodore.com!cbmehq!cbmger!edith!sticht@rutgers.EDU
  261.       or: IWSTICHT@ibm.rz.uni-passau.de
  262. Fido-Net: Stefan Sticht (2:242/16)
  263.  
  264.  
  265.  
  266. Please include the version number of the commodity in every bug report
  267. You  get  the  version  number  using  the  Version  command:
  268.                      Version [<path>]<commodity>
  269.